package com.example.springboot.mapper;

import com.example.springboot.entity.MerchantOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MerchantOrderMapper {
    List<MerchantOrder> findAll(@Param("offset") int offset, @Param("size") int size, @Param("orderId") String orderId, @Param("status") String status, @Param("serviceType") String serviceType);
    List<MerchantOrder> findByAdminId(@Param("offset") int offset, @Param("size") int size, @Param("adminId") int adminId, @Param("orderId") String orderId, @Param("status") String status, @Param("serviceType") String serviceType);
    int getTotalOrders(@Param("orderId") String orderId, @Param("status") String status, @Param("serviceType") String serviceType);
    int getTotalOrdersByAdminId(@Param("adminId") int adminId, @Param("orderId") String orderId, @Param("status") String status, @Param("serviceType") String serviceType);
    MerchantOrder findById(Integer orderId);
    void insert(MerchantOrder merchantOrder);
    void update(MerchantOrder merchantOrder);
    void deleteById(Integer orderId);
    Integer findAdminIdByUsername(String username);
    String findAdminRoleByUsername(String username);
}